<?php

class Home extends CI_Controller{
    
    public function home_page(){
//<<<<<<< .mine(samar)
        
       $user_data=$this->session->all_userdata(); 
       $site_lang=array('lang'=>"english");//set the site language to English at the beginning
       $this->session->set_userdata($site_lang);
       $this->load->view('Home',$user_data);
        
        
//=======
//        $lang = 'en';
//        $CurrenctLang =$lang;
//        if ($CurrenctLang == 'en') {
//            $this->lang->load('home', 'english');
//        } else {
//            $this->lang->load('home', 'arabic');
//        }
//        $data["output"] =  $this->lang->line("msg_welcome");
//        $this->load->view('Home',$data);
 //>>>>>>> .r9
    }  
    
    public function ar_lang()
   {
      $this->session->set_userdata('lang','arabic');//set the site language to Arabic when selecting Arabic  
      $this->load->model('Get_data'); 
      $data = $this->Get_data->get_arabic();
      
      //$data['title'] = "Artical";
     //  print_r($data);
     print_r($this->session->all_userdata());
      $this->load->view('Ar_welcom',$data);
   }
   
    public function en_lang()
   {
        
        $this->session->set_userdata('lang', 'english');//set the site language to English when selecting English 
        $this->load->model('Get_data'); 
        $data = $this->Get_data->get_english();
        print_r($this->session->all_userdata());
        $this->load->view('En_welcom',$data);
   }
   
   
   public function select_lang(){
       
       
       
       
   }
    
}


